<?php

require_once './include/common.inc.php';
require_once 'left.php';
require_once 'right.php';

$page_title = 'Acuity World WebShop';
$menu_id = 0;
$menu_str = PrintMenu();

$promoter_menu_id = 4;
$promoter_menu_str = PrintPromoterMenu();


if (isPromoterLogin()) {
    $sql = "SELECT * FROM  `promoter_info` WHERE  `id` = '$promoter_uid'";
    $promoter_info_ary = $db->get_one($sql); 
} else {
    header("LOCATION:promoter_login.php");
    exit;
}

$asa = 0;   // Accumulated Sales Amount
$ac = 0;    // Accumulated Commission
$cp = 0;    // Commission Paid
$co = 0;    // Commission Outstanding
$cms=getCms($promoter_uid);

$asa=$cms["cost"];
$ac=$cms["cms"];
$co=$cms["cms_osd"];
$cp=$cms["cms_paid"];
$commission_ary=getCmsPaidList($promoter_uid);

for($i=0;$i<count($commission_ary);$i++)
{
		$commission_ary[$i]['pay_date']=date('d/m/Y', $commission_ary[$i]['pay_date']);
}




require_once PrintEot('header');
require_once PrintEot('left');
require_once PrintEot('promoter_commission');
require_once PrintEot('right');
require_once PrintEot('footer');

?>